﻿using System;
using IDeal.Models;

namespace IDeal.Exceptions
{
    public class ErrorResponseException : ApplicationException
    {
        public ErrorResponse Error { get; private set; }

        public ErrorResponseException(ErrorResponse error) : base(string.Format("{0}: {1}. {2}", error.Code, error.Message, error.Detail))
        {
            Error = error;
        }
    }
}